package com.example.demo.xiangyuan;

/**
 * @author xin.you
 * @date 2022/2/3
 * @description
 */
public class Client {
    public static void main(String[] args) {
        WebsiteFactory factory=new WebsiteFactory();
        Website website1 = factory.getWebsite("新闻");
        website1.use(new User("张三"));
        Website website2 = factory.getWebsite("体育");
        website2.use(new User("李四"));
        Website website3 = factory.getWebsite("体育");
        website3.use(new User("王五"));
        int count = factory.getCount();
        System.out.println(count);
    }
}
